package club.pchome.mapper;

import club.pchome.model.User;
import org.apache.ibatis.annotations.*;

@Mapper
public interface UserMapper {

    @Delete("delete from c_user where id = #{id}")
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    @Insert("insert into c_user (nickName , loginName, passwd, loginIp, createTime, device, uuid) values (#{loginName},#{loginName}, #{passwd}, #{loginIp}, now(), #{device}, #{uid})")
    int regUser(User user);

    public User loginUser(String username , String passwd);

    public boolean isTrue(User user);
}